package com.aizuda.boot.modules.flw.entity.dto;

import com.aizuda.boot.modules.business.contract.entity.vo.WorkflowFormFieldsListDTO;
import com.aizuda.bpm.engine.entity.FlwProcess;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

import java.util.List;
import java.util.Map;

/**
 * @Author sangyirong
 * @ClassName FlwProcessNewDTO
 * @Version 1.0
 * @Date 2025/6/27 13:35
 */
@Getter
@Setter
public class FlwProcessNewDTO extends FlwProcessDTO{

    private Long workflowId;

    private Long negotiationId;

    public static FlwProcessNewDTO of(FlwProcess flwProcess) {
        FlwProcessNewDTO dto = new FlwProcessNewDTO();
        dto.setProcessId(flwProcess.getId());
        dto.setProcessKey(flwProcess.getProcessKey());
        dto.setProcessName(flwProcess.getProcessName());
        dto.setProcessIcon(flwProcess.getProcessIcon());
        dto.setProcessType(flwProcess.getProcessType());
        dto.setUseScope(flwProcess.getUseScope());
        dto.setProcessState(flwProcess.getProcessState());
        dto.setModelContent(flwProcess.getModelContent());
        dto.setRemark(flwProcess.getRemark());
        return dto;
    }

}
